import request from './request';

enum api {
	videoBrowseRecord = 'Api/getVideoBrowseRecord', // 获取观看记录
	getAmountByMemberBalance = 'Api/getAmountByMemberBalance', // 获取用户余额
	collectRecord = 'Api/getCollectRecord', // 获取收藏记录
	paymentRecord = 'Api/getPaymentRecord', // 获取支付记录
	orderRefund = 'Api/orderRefund', // 订单退款
	userTeam = 'Api/getUserTeam', // 获取会员团队
	redMotherTeam = 'Api/getRedMotherTeam', // 获取红娘团队
	storeTeam = 'Api/getStoreTeam', // 获取门店团队
	evaluationList = 'Api/getEvaluationList', // 获取评价列表
	addEvaluation = 'Api/addEvaluation', // 添加评价
	updateMemberState = 'Api/updateMemberState', // 添加评价
	generatePosters = 'Api/generatePosters', // 获取海报图
	myCommissionRecords = 'Api/getMyCommissionRecords', // 获取我的收益记录
	qestionList = 'Api/getQuestionList', // 疑问解答
	messageRecords = 'Api/getMessageRecords', // 留言列表
	submitMessage = 'Api/submitMessage', // 提交留言
	loginStore = 'Api/loginStore', // 门店-登录
	myWithdrawalAccounts = 'Api/pagingGetMyWithdrawalAccounts', // 提现账号列表
	addMyWithdrawalAccount = 'Api/addMyWithdrawalAccount', // 提现账号列表
	deleteMyWithdrawalAccount = 'Api/deleteMyWithdrawalAccount', // 删除提现账号
	getMyWithdrawalAccount = 'Api/getMyWithdrawalAccount', // 获取提现账号
	editMyWithdrawalAccount = 'Api/editMyWithdrawalAccount', // 修改提现账号
	memberWithdrawalCommission = 'Api/memberWithdrawalCommission', // 提现接口
	myWithdrawRecords = 'Api/getMyWithdrawRecords', // 提现明细
	storeOrderByShooteVcr = 'Api/getStoreOrderByShooteVcr', // 门店-我的列表
	updateStoreVideoShooteState = 'Api/updateStoreVideoShooteState', // 门店-接单状态更新 拍摄完成
	editEvaluation = 'Api/editEvaluation', // 修改评价
	videoAuthStoreSelect = 'Api/getStoreList' // 视频认证门店选择
}

export function editEvaluation(data: object) {
	return request.post({ url: api.editEvaluation, data });
}

export function updateStoreVideoShooteState(user_id: number, order_id: number) {
	return request.get({ url: api.updateStoreVideoShooteState, params: { user_id, order_id } });
}

export function storeOrderByShooteVcr(params: object) {
	return request.get({ url: api.storeOrderByShooteVcr, params });
}

export function myWithdrawRecords(params: object) {
	return request.get({ url: api.myWithdrawRecords, params });
}

export function memberWithdrawalCommission(data: object) {
	return request.post({ url: api.memberWithdrawalCommission, data });
}

export function editMyWithdrawalAccount(data: object) {
	return request.post({ url: api.editMyWithdrawalAccount, data });
}

export function getMyWithdrawalAccount(user_id: number, id: number) {
	return request.post({ url: api.getMyWithdrawalAccount, data: { user_id, id } });
}

export function deleteMyWithdrawalAccount(user_id: number, id: number) {
	return request.post({ url: api.deleteMyWithdrawalAccount, data: { user_id, id } });
}

export function addMyWithdrawalAccount(data: object) {
	return request.post({ url: api.addMyWithdrawalAccount, data });
}

export function myWithdrawalAccounts(user_id: number) {
	return request.get({ url: api.myWithdrawalAccounts, params: { user_id, pageIndex: 1, pageSize: 999 } });
}

export function loginStore(data: object) {
	return request.post({ url: api.loginStore, data });
}

export function submitMessage(data: object) {
	return request.post({ url: api.submitMessage, data });
}

export function orderRefund(data: object) {
	return request.post({ url: api.orderRefund, data });
}

export function messageRecords(params: object) {
	return request.get({ url: api.messageRecords, params });
}

export function qestionList() {
	return request.get({ url: api.qestionList, params: { pageIndex: 1, pageSize: 999 } });
}

export function myCommissionRecords(params: object) {
	return request.get({ url: api.myCommissionRecords, params });
}

export function generatePosters(params: object) {
	return request.get({ url: api.generatePosters, params });
}

export function updateMemberState(data: object) {
	return request.post({ url: api.updateMemberState, data });
}

export function addEvaluation(data: object) {
	return request.post({ url: api.addEvaluation, data });
}

export function evaluationList(params: object) {
	return request.get({ url: api.evaluationList, params });
}

export function redMotherTeam(data: object) {
	return request.post({ url: api.redMotherTeam, data });
}

export function userTeam(data: object) {
	return request.post({ url: api.userTeam, data });
}

export function storeTeam(data: object) {
	return request.post({ url: api.storeTeam, data });
}

export function paymentRecord(data: object) {
	return request.post({ url: api.paymentRecord, data });
}

export function collectRecord(params: object) {
	return request.get({ url: api.collectRecord, params });
}

export function videoBrowseRecord(data: object) {
	return request.post({ url: api.videoBrowseRecord, data });
}

export function getAmountByMemberBalance(params: object) {
	return request.get({ url: api.getAmountByMemberBalance, params });
}

export function getVideoAuthStoreList(params: object) {
	return request.get({ url: api.videoAuthStoreSelect, params });
}
